<%--
  Created by IntelliJ IDEA.
  User: yx
  Date: 2018/7/9
  Time: 14:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../include/admincontent.jsp" %>
<link rel="stylesheet" href="../../resources/js/plugins/layui/css/layui.css" />
<script src="../../resources/js/plugins/layui/layui.all.js" type="text/javascript"></script>
<div>
    <form class="layui-form" action="/ExcelDown/ExportResumesSearch" id="titleForm" >
        ${searchdata}
        <div style="margin-bottom: 20px">
            <div class="layui-form-item" >
                <div class="layui-input-block" style="margin-left: 10px;">
                    <input type="checkbox" name="KEY.p.ROWNUM" title="序号" value="序号" checked>
                    <input type="checkbox" name="KEY.p.NAME" title="姓名" value="姓名" checked>
                    <input type="checkbox" name="KEY.p.GENDER" title="性别" value="性别" checked>
                    <input type="checkbox" name="KEY.u.JG" title="籍贯" value="籍贯" checked>
                    <input type="checkbox" name="KEY.p.CODE" title="身份证号" value="身份证号" checked>
                    <input type="checkbox" name="KEY.p.BIRTHDAY" title="出生日期" value="出生日期" checked>
                </div>
            </div>
            <div class="layui-form-item" >
                <div class="layui-input-block" style="margin-left: 10px;">
                    <input type="checkbox" name="KEY.p.ADDUNAME" title="学校名称" value="学校名称" checked>
                    <input type="checkbox" name="KEY.p.MAJOR" title="专业" value="专业" checked>
                    <input type="checkbox" name="KEY.p.GRADUATIONTIME" title="毕业时间" value="毕业时间">
                    <input type="checkbox" name="KEY.p.TEL" title="联系电话" value="联系电话" checked>
                    <input type="checkbox" name="KEY.p.BX" title="在校表现" value="在校表现">
                    <input type="checkbox" name="KEY.p.GUAKE" title="成绩有无挂科" value="成绩有无挂科">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left: 10px;">
                    <input type="checkbox" name="KEY.p.HEIGHT" title="身高(CM)" value="身高(CM)">
                    <input type="checkbox" name="KEY.p.JOB" title="岗位组" value="岗位组" checked>
                    <input type="checkbox" name="KEY.p.STATE" title="个人信息" value="个人信息">
                    <input type="checkbox" name="KEY.p.RSTATE" title="筛选状态" value="筛选状态">
                </div>
            </div>
            <%--<div class="layui-form-item">
                <div class="layui-input-block" style="margin-left: 10px;">
                    <input type="checkbox" name="UNIVERSITY" title="毕业院校" value="毕业院校">
                    <input type="checkbox" name="MAJORNAME" title="所学专业" value="所学专业">
                    <input type="checkbox" name="JNAME" title="招聘职位" value="招聘职位">
                    <input type="checkbox" name="EXPECTEDSALARYAMOUNT" title="期望月薪" value="期望月薪">
                    <input type="checkbox" name="FQSTATE" title="是否放弃" value="是否放弃">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left: 10px;">
                    <input type="checkbox" name="专科院校" title="专科院校" value="专科院校">
                    <input type="checkbox" name="专科专业" title="专科专业" value="专科专业">
                    <input type="checkbox" name="本科院校" title="本科院校" value="本科院校">
                    <input type="checkbox" name="本科专业" title="本科专业" value="本科专业">
                    <input type="checkbox" name="研究生院校" title="研究生院校" value="研究生院校">
                    <input type="checkbox" name="研究生专业" title="研究生专业" value="研究生专业">
                </div>
            </div>--%>

            <div class="layui-form-item">
                    <div class="layui-input-block" style="text-align: center; vertical-align: center;margin-left: 0px;">
                        <button class="layui-btn" id="btn_export">导出</button>
                        <button class="layui-btn" id="btn_cancel">取消</button>
                    </div>
            </div>
        </div>

    </form>

</div>
<script>
    var form;
    layui.use('form', function(){
         form = layui.form;
        //各种基于事件的操作，下面会有进一步介绍
        form.render();
    });
    $(function () {
        $('#btn_export').click(function () {

            $("#titleForm").submit();
            /*$.ajax({
                    url: '/ExcelDown/ExportResumes',
                    data: $("#titleForm").serialize(),
                    type:'POST',
                    dataType: 'json',
                    success: function (data) {
                        parent.layer.closeAll();
                    }
            });*/
        });

        $('#btn_cancel').click(function () {
            parent.layer.closeAll();
        })

        var parseParam = function(param, key) {
            var paramStr = "";
            if (param instanceof String || param instanceof Number || param instanceof Boolean) {
                paramStr += "&" + key + "=" + encodeURIComponent(param);
            } else {
                $.each(param, function(i) {
                    var k = key == null ? i : key + (param instanceof Array ? "[" + i + "]" : "." + i);
                    paramStr += '&' + parseParam(this, k);
                });
            }
            return paramStr.substr(1);
        };
    })
</script>